<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/head.jsp"%>
<div class="bjui-pageContent">
	<form action="${ctx}/sys/add${actionclass}.do" id="addForm_${actionclass}" data-toggle="validate" data-alertmsg="false">
		<input type="hidden" value="${course.id}" name="courseId" />
		<table class="table table-condensed table-hover" width="100%">
			<tbody>
				<tr>
					<td>
						<label for="Course_teacher" class="control-label x150">教师：</label>
						 ${course.teacher.fname }
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_name" class="control-label x150">课程：</label>
						 ${course.name} 
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_keshi" class="control-label x150">课时：</label>
						 ${course.keshi} 
					</td>
				</tr>

				<tr>
					<td>
						<label for="Course_fen" class="control-label x150">学分：</label>
						 ${course.fen} 
					</td>
				</tr>

				<tr>
					<td>
						<label for="CourseClazz_clazz" class="control-label x150">班级：</label>
						<select name="clazzId" id="CourseClazz_clazz" data-toggle="selectpicker" data-rule="required" data-width="300">
							<c:forEach items="${list }" var="item">
								<option value="${item.id }">${item.name }</option>
							</c:forEach>
						</select>
					</td>
				</tr>


			</tbody>
		</table>
	</form>
	<table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
		<thead>
			<tr>
				<th>班级</th>
				<th>年份</th>
				<th>班主任</th>

				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${clist}" var="item">
				<tr data-id="${item.id }">
					<td>${item.clazz.name}</td>
					<td>${item.clazz.nian}</td>
					<td>${item.clazz.banzr}</td>

					<td>
						<a href="${ctx}/sys/deleteCourseClazz.do?ids=${item.id}" class="btn btn-orange" data-toggle="doajax"
							data-confirm-msg="确定要删除该行信息吗？">
							<i class="fa fa-remove fa-fw"></i>
						</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<div class="bjui-pageFooter">
	<ul>
		<li>
			<button type="button" class="btn-close" data-icon="close">关闭</button>
		</li>
		<li>
			<button type="submit" class="btn-default" data-icon="save">添加上课班级</button>
		</li>
	</ul>
</div>
<script type="text/javascript">
	function pic_upload_success(file, data) {
		var json = $.parseJSON(data)
		$(this).bjuiajax('ajaxDone', json)
		if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
			$('#j_custom_pic').val(json.filename).trigger('validate')
			$('#j_custom_span_pic').html('<img src="${ctx}/resource/' + json.filename + '" width="100" />')
		//$('#j_custom_span_pic').html(json.filename)
		}
	}
</script>
